// 短路运算
!localStorage.getItem("token") && (location.href = "login.html");